import Navbar from '@/components/navbar'
import Tabbar from '@/components/tabbar'
import Home from '@/views/home'
import Sofa from '@/views/sofa'
import Bed from '@/views/bed'
import Find from '@/views/find'
import Mine from '@/views/mine'

const routes = [
  {
    path: '/',
    redirect: '/home',
  },
  {
    path: '/home',
    components: {
      navbar: Navbar,
      default: Home,
      tabbar: Tabbar,
    },
    meta: {
      title: '首页',
      icon: 'home-o',
      inTabbar: true,
    },
  },
  {
    path: '/sofa',
    components: {
      navbar: Navbar,
      default: Sofa,
      tabbar: Tabbar,
    },
  },
  {
    path: '/bed',
    components: {
      navbar: Navbar,
      default: Bed,
      tabbar: Tabbar,
    },
  },
  {
    path: '/find',
    components: {
      navbar: Navbar,
      default: Find,
      tabbar: Tabbar,
    },
    meta: {
      title: '发现',
      icon: 'search',
      inTabbar: true,
    },
  },
  {
    path: '/mine',
    components: {
      navbar: Navbar,
      default: Mine,
      tabbar: Tabbar,
    },
    meta: {
      title: '我的',
      icon: 'manager-o',
      inTabbar: true,
    },
  },
]

export default routes
